<!--
 * @Description: 垂直居中
 * @Author: charles
 * @Date: 2021-08-12 09:45:52
 * @LastEditors: charles
 * @LastEditTime: 2021-08-12 09:48:56
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>垂直</title>
  <style>
    .one {
      background-color: mediumseagreen;
      color: #fff;
      height: 100px;
      text-align: center;
      line-height: 100px;
      /* 此方法限制为只能垂直居中 */
      /* 可以把盒子表格化，垂直居中多行文本 */
    }

    

    

  </style>
</head>
<body>
  <div class="one">
    hello world
  </div>
</body>
</html>
